using Microsoft.Xna.Framework;

namespace Game500.Client.Src
{
  public abstract class Renderable
  {
    private Vector3 myPosition;
    private Vector2 myScale;

    protected Renderable()
    {
      Origin = new Vector2(0.5f, 0.5f);
      Scale = Vector2.One;
      Visible = true;
    }

    protected Renderable(Renderable original)
    {
      Origin = original.Origin;
      Position = original.Position;
      Rotation = original.Rotation;
      Scale = original.Scale;
      Visible = original.Visible;
    }

    public bool Visible { get; set; }

    public Vector2 Origin { get; set; }

    public float Z
    {
      get { return myPosition.Z; }
      set { myPosition.Z = value; }
    }

    public Vector3 Position
    {
      get { return myPosition; }
      set { myPosition = value; }
    }

    public float Rotation { get; set; }

    public Vector2 Scale
    {
      get { return myScale; }
      set { myScale = value; }
    }

    public float X
    {
      get { return myPosition.X; }
      set { myPosition.X = value; }
    }

    public float Y
    {
      get { return myPosition.Y; }
      set { myPosition.Y = value; }
    }

    public float ScaleX
    {
      get { return myScale.X; }
      set { myScale.X = value; }
    }

    public float ScaleY
    {
      get { return myScale.Y; }
      set { myScale.Y = value; }
    }

    public abstract Renderable Clone();

    public abstract void Render(Renderer renderer);
  }
}